package github.flandre.examplemod.common.item.food;

import github.flandre.examplemod.core.init.BlockInit;
import github.flandre.examplemod.core.init.Itemgroup.ExampleGroup;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Food;
import net.minecraft.item.Item;
import net.minecraft.potion.EffectInstance;
import net.minecraft.potion.Effects;

public class ExampleFood extends BlockItem {
    private static final Food food = (new Food.Builder())
            .saturation(5) //饱腹度
            .hunger(10) //鸡腿
            .effect(
                    ()-> new EffectInstance(Effects.LUCK,60*20,1),//药水效果 时间 等级
                    1) //触发概率
            .setAlwaysEdible() //满饱腹度也能吃
            .fastToEat() //吃的更快
            .build();


    public ExampleFood() {
        //super(new Properties().group(ExampleGroup.exampleGroup).food(food));
        super(BlockInit.EXAMPLE_CROPS.get(),new Properties().group(ExampleGroup.exampleGroup).food(food));
    }
}
